<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //1.检测获取字符串的长度 length
        var str = 'my name is andy';
        console.log(str.length); //15
        //2.字符串的拼接 + 只要有字符串类型的和别的类型的进行拼接最后结果都是字符串类型的
        console.log('沙漠' + '骆驼'); //沙漠骆驼
        console.log('pink老师' + 18); //pink老师18
        console.log('pink' + true); //pinktrue
        console.log(12 + 12); //24
        console.log('12' + 12); //1212
    </script>
</head>

<body>

</body>

</html>